Florian Müllner [Thu, 22 May 2025 01:27:51 +0000 (03:27 +0200)]
dbusServices/extensions: Use regular constructors
Regular constructors have worked for GObject subclasses for a couple
of years now. While there is no functional difference to _init(),
it's simply nicer to use the same syntax for all classes, so quickly
change that before doing further changes.
Jonas Dreßler [Sat, 5 Nov 2022 21:36:47 +0000 (22:36 +0100)]
Connect to DnD signals using connectObject()
Currently DnD uses `disconnectAll()` in a `::destroy` signal handler for
the drag actor. This is a little weird, as usually the connecting object
is in charge of disconnecting as well.
Since we have some nice convenience API for this nowadays, use
`connectObject()` when connecting to DnD signals in the various draggable
actors that we have, which ensures the signal is disconnected as soon as
the draggable actors get destroyed.
This allows removing the call to `disconnectAll()` in DnD.
Jonas Dreßler [Thu, 24 Jul 2025 23:30:29 +0000 (01:30 +0200)]
smartcardManager: Properly disconnect signal connections from tokens
The `token.disconnectAll()` call here is not going to work: The method is
provided by gjs as convenience for native JS objects (added to an object
using `Signals.addSignalMethods()`). The token here meanwhile is a GObject,
which doesn't have a `disconnectAll()` method.
To make it (hopefully) work as intended, use the convenience functions
that we actually do add to GObjects, that is `connectObject()` and
`disconnectObject()`.
Jonas Dreßler [Mon, 24 Jul 2023 20:22:49 +0000 (22:22 +0200)]
appDisplay: Set popup menu side via parameter to AppIcon class
Let's make the "side" argument to the popupMenu() function for app icons
a param to the AppIcon class itself. The side is not that dynamic that it
needs to be defined on calling of the function, instead it can be defined
on creation of the AppIcon as well.
Sebastian Keller [Wed, 30 Jul 2025 13:24:29 +0000 (15:24 +0200)]
slider: Don't preserve paths after filling
Prior to 6fd0aac86 the paths were preserved when filling to allow
stroking the path afterwards. The stroke() then would have cleared the
path. Then when the stroking was dropped in that commit, a second fill()
call, this time without preserving the path was added, but missed from
the end arc of the bar level. This then would leak the path to the
slider handle.
Fix this by always using fill() instead of fillPreserve().
Florian Müllner [Tue, 10 Jun 2025 01:11:05 +0000 (03:11 +0200)]
tools: Switch to flat config for eslint
Both the .json and .yml config formats are deprecated in favor
of flat configs exported from eslint.config.js files.
The good news is that gjs' config is now available as a shared
config from the `eslint-config-gnome` package in World/javascript,
so we no longer have to copy the entire thing.
Florian Müllner [Tue, 10 Jun 2025 00:36:50 +0000 (02:36 +0200)]
tools: Add run-eslint.sh script
The script is a small wrapper around the `ci-run-eslint` package
from World/javascript, which is a generalized and improved version
of the .gitlab-ci/run-eslint script we are currently using.
It only requires `npm` to be available, so it simplifies running
eslint locally quite a lot.
magnifier: Scale the sprite to match the current monitor scaling
Compute the sprite texture scale (unfortunately using a workaround, based on
mutter cursor size preferences, tying to figure out the closest texture integer
scaling), and use this value to compute the scaling that should be applied to
the sprite in order to match the current monitor scaling.
ci: Install dependencies when using custom destdir
Commit fd4320156c9 changed the `update-mutter` command inside the
toolbox to also install into the sysext extension dir, so people
who don't build mutter themselves can still use the sysext tooling.
Except they can't, because additional dependencies from mutter's
install-common-dependencies.sh script are missing as the script
is currently only invoked by the meson-build script.
Fix that by also running the script when running install-meson-project
with a destdir, as is done from the update-mutter command.
gnome-session is no longer a service manager, and thus doesn't need to
be notified of our readiness like this. We now do this exclusively
through systemd
screenshot: Fix taking interactive screenshots via D-Bus
The D-Bus method relies on the `screenshot-taken` and `closed` signals
to differentiate successful operations from canceled/failed ones.
However as the `screenshot-taken` signal is emitted asynchronously,
it may end up being emitted after the `closed` signal even in case
of success. Await the result to ensure correct ordering.
The intermediate container allows the theme to control the distance
from the edge and spacing between buttons, which is more accessible
to the designers than computing the values from code.
loginDialog: Increase size of session/a11y buttons
The buttons on the login screen for the session and accessibility
menus can easily be lost, due to a combination of their size and
position, and the large amount of empty space.
network: Do not consider networks without ID as available
In some rare (and weird) cases network manager may provide us
connections without settings (since connection.get_settings() is
actually nullable, and this may lead to have a NULL connection ID, that
eventually breaks the network menu completely:
(gnome-shell:1579214): GNOME Shell-CRITICAL **: 20:27:14.874: Error:
Argument str2 may not be null
Now, despite that specific connection here has valid settings when
loaded from dbus, it may still happen that NM lib fails at other level in
fetching its settings.
That said, we should not fail if a connection has no settings, and
just skip it.
This was part of the original MxWidget import, but we never used
it for anything. After more than 15 years it is unlikely that we
are going to start, so remove it.
Carlos Garnacho [Sun, 29 Jun 2025 09:35:24 +0000 (11:35 +0200)]
screenShield: Fix pointer showing on motion
As an additional side effect of switching to the cursor visibility
inhibition API in the cursor tracker, there is no longer this
infighting in Mutter where pointer motion tries to set pointer
visibility on (since it's the last device used), and other places
wanting to inhibit it, such as the screenshield.
This resulted on the cursor wanting to show by itself, and somehow
trigger captured motion events on the ClutterStage. This no longer
happens, which results in the pointer staying hidden, seat unfocus
remaining uninhibited, and no motion events being sent in (since
the pointer device now does remain unfocused).
Fix this by:
- Setting a seat unfocus inhibition, so the pointer triggers motion
and focus despite being hidden
- Connecting to captured events on the screen lock group widget,
since captured events will respect the existing grab
This results in pointer motion again resulting on the cursor being
shown, when waking up the lockscreen.
Fixes: 91c6366e0 ("Adjust to cursor tracker visibility API changes")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3781>
Florian Müllner [Sun, 22 Jun 2025 12:59:07 +0000 (14:59 +0200)]
screenshot: Remove gnome-screenshot from allowed senders
It was removed from core after we got a built-in screenshot UI in
the shell, and is mostly unmaintained nowadays.
There is no good reason anymore for treating it differently than other
3rd-party screenshot tools, so stop giving it default access to the
private screenshotting API.
Florian Müllner [Sat, 7 Jun 2025 17:13:59 +0000 (19:13 +0200)]
loginDialog: Add a11y menu
When quick settings become configurable, users can add the a11y
toggles they need to the regular quick settings menu. This does
not really work for the login screen, where all a11y features
should be available by default.
Address this by adding a dedicated a11y menu button next to the
session menu button.
Florian Müllner [Sat, 7 Jun 2025 16:45:16 +0000 (18:45 +0200)]
status/accessibility: Export quick toggles
Implement quick toggles for every accessibility feature that is
currently exposed by the menu. Those toggles will eventually replace
the menu when quick setting become configurable.
However the login screen will use a dedicated accessibility menu
(once again), which does not depend on the quick settings feature,
so add the toggles now to allow implementing it.
It is a simple on/off control, which makes it a good fit for
quick settings. It also makes sense to expose the feature together
with other system controls, and while this somewhat removes the
control from the context of notifications, that doesn't seem to
be an issue on other platforms.
The control for enabling/disabling do-not-disturb will be moved into
quick settings. It makes sense to then also move the indicator, so stop
showing the do-not-disturb status in the top bar's messages indicator.
Instead, just hide the indicator altogether when do-not-disturb
is active.
Aligning the button to the end is a bit odd after removing the
do-not-disturb switch, so move it to the start instead and make
it pill-shaped to align better with the popover.
Carlos Garnacho [Wed, 30 Apr 2025 09:13:09 +0000 (11:13 +0200)]
windowManager: Stop bridging pad changes to OLED updates
The small OLEDs alongside pad buttons in Wacom Intuos 4 models will
stop being supported. See
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/416
Florian Müllner [Thu, 26 Jun 2025 10:07:07 +0000 (12:07 +0200)]
st/entry: Forward label-actor to internal ClutterText
The StWidget:label-actor property is a convenient way of setting up an
actor's labelled-by relationship. However on StEntry, it is currently
fairly useless because if the entry is focused, the actual keyboard
focus will be on the internal ClutterText rather than the entry itself,
and orca ignores ancestors in most cases.
Address this by tracking the entry's label-actor property, and replicate
the labelled-by relationship on the internal ClutterText actor.
Florian Müllner [Thu, 26 Jun 2025 18:35:10 +0000 (20:35 +0200)]
overview: Delay showing until there is gesture progress
Currently swiping down in the session enters the overview, but
as there is no progress (clamped to 0 from negative), the only
visible effect is that the top bar transitions to transparent.
Avoid this glitch by delaying showing the overview until there
is some non-0 progress.
Sebastian Wick [Wed, 25 Jun 2025 11:15:24 +0000 (13:15 +0200)]
Adjust to cursor tracker visibility API changes
The old `Meta.CursorTracker.set_pointer_visible` method has been
replaced by `inhibit_cursor_visibility` and
`uninhibit_cursor_visibility`.
Change the code to use the new API which makes the code more robust
because we don't have to listen for changes and then try to force it
back to what we want.
authPrompt: Notify error messages in GDM login/unlock
When there is an error during GDM login or unlock (for example,
typing a wrong password), a text message is shown, but nothing
is said by the screen reader.
This patch fixes this, by notifying any error set in the auth
prompt.
Thomas Booker [Mon, 23 Jun 2025 06:13:08 +0000 (18:13 +1200)]
tools: Set XDG_DATA_DIRS inside toolbox run script
Some host OSes (like NixOS) have a weird $XDG_DATA_DIRS environment
variable that gets inherited into the toolbox and brakes GSettings schemas.
Address this by appending the default /usr/share to $XDG_DATA_DIRS if
necessary.
Daniel van Vugt [Tue, 24 Jun 2025 06:59:21 +0000 (14:59 +0800)]
extensions-tool: Fix security warnings about format string injection
Fixes:
```
../subprojects/extensions-tool/src/command-upload.c: In function ‘response_get_token’:
../subprojects/extensions-tool/src/command-upload.c:126:7: warning: format not a string literal and no format arguments [-Wformat-security]
126 | g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, msg);
| ^~~~~~~~~~~
../subprojects/extensions-tool/src/command-upload.c: In function ‘session_get_login_token’:
../subprojects/extensions-tool/src/command-upload.c:294:20: warning: format not a string literal and no format arguments [-Wformat-security]
294 | detail ? detail : soup_status_get_phrase (status));
| ^~~~~~
../subprojects/extensions-tool/src/command-upload.c: In function ‘session_upload_file’:
../subprojects/extensions-tool/src/command-upload.c:357:20: warning: format not a string literal and no format arguments [-Wformat-security]
357 | detail ? detail : soup_status_get_phrase (status));
| ^~~~~~
```
Alynx Zhou [Fri, 20 Jun 2025 15:05:28 +0000 (23:05 +0800)]
keyring: Allow user to correct password after checking failed
Currently we make entries and buttons insensitive and do some checks
before calling the GcrPrompt implementation to complete. However, if
checks get failed, for example, new passwords mismatched due to typo,
we should make entries and buttons sensitive again to allow user to
correct it.
Florian Müllner [Sun, 11 May 2025 13:02:51 +0000 (15:02 +0200)]
extensions-tool: Add upload command
Add a new command for uploading new extension versions to
https://extensions.gnome.org. This is particularly useful
where the web interface is inconvenient or not available,
for example when uploading multiple extensions or from a
tag pipeline in CI.
Mike FABIAN [Tue, 17 Jun 2025 13:48:42 +0000 (15:48 +0200)]
status/keyboard: Limit the input method indicator to < 3 grapheme clusters
The Javascript string length is not suitable for measuring the
approximate length of a rendered text in the input method
indicator. Most single code point emoji like `🚀 U+1F680` get length 2
already, adding a variation selector to make the emoji display in
black and white like `🚀︎ U+1F680 U+FE0E` makes the length 3. More
complicated emoji sequences may get much longer lengths even though
the still display as one character. For example `👩👩👧👧 U+1F469,
U+200D, U+1F469, U+200D, U+1F467, U+200D, U+1F467` gets length 11.
This is not only the case for emoji but also for other text, for
example the Korean jamo `각 U+1100, U+1161, U+11A8` display as only 1
glyph but the Javascript length is 3.
A better way to measure the approximate length of a rendered text is
to count the Unicode grapheme clusters in the text using
Intl.Segmenter. This counts all the examples above as 1 grapheme
cluster each.
There seem to be some bugs in the Intl.Segmenter, for example
`क्षि U+0915, U+094D, U+0937, U+093F` is counted as 2 grapheme clusters,
the correct result should be 1. But it is good enough to measure
the approximate length of the input method indicator and certainly
better than the Javascript string length.
Florian Müllner [Wed, 4 Jun 2025 11:01:18 +0000 (13:01 +0200)]
subprojects: Switch to wrap to provide libshew
The Extensions app is very simple, but hard to contribute to
because the default workflow (open in Builder, hit run) does
not work due to the code being in a subtree of gnome-shell.
However it cannot be easily split into its own repository,
while the shew subproject is still provided gnome-shell.
To allow for the future split, libshew was moved into a
separate repo, so remove the in-tree subproject and replace
it with a meson wrap.
With the exception of Simple Scan, the last update to this list was 5
years ago. If Simple Scan is one of your favorite apps and you are still
using GNOME 43 or below, then I am sorry. Otherwise, this list is
entirely obsolete.
Don't rename desktop files. It's very disruptive.
If you do need to rename a desktop file for some reason, the user will
just have to pin the favorite app again.